package com.tlw.leave.handle;

import org.slf4j.Logger;
import org.aspectj.lang.annotation.Before;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component
@org.aspectj.lang.annotation.Aspect
public class Aspect {

    private final static Logger LOGGER = LoggerFactory.getLogger(Aspect.class);
    //定义切点

    //前置处理
    @Before(value = "execution(* com.tlw.leave.controller.informationController.*(..))")
    public void auth() {
        LOGGER.info(new Date()+"用户执行了这个方法");  //查看当前方法名

    }
}
